Involver Developer Network : Chapter 8 - Market Segmentation and Localization
This page last changed on Mar 28, 2012 by jed.wheeler@involver.com.
In this Chapter:
One of the great things about web development is that it has such a broad reach, people all over the world can use the same few basic tools to access content anywhere else. But what if you want to show different content to different people? SML has a range of tools available to do just that. Whether you want to build a fan gate that requires someone to “Like” your page before they can view its content or you want to target specific content to people according to language, country, or even ?klout score, you can do it in SML. Adding Location and Language targetingIn ?Chapter 2 - Variables in SML we looked at if-logic using SML variables to add fan gates and even time release content. We can use this same system to show/hide feature blocks and editable assets according to the users country and or language.
Click "Save and test." The Save & Test button will launch a popup window that allows us to test how our page will appear for any given combination of language, country, and fan status. It also allows us to preview the app as it will appear on mobile and the open web, should we choose to take advantage of that functionality. Using phrasebook_managerIf logic is a very powerful tool, but it can be cumbersome to write out a dozen if statements for each chunk of text you want to localize. For pages that will be pushed out to large global audiences, we recommend using the phrasebook_manager feature block to streamline this process. With the phrasebook manager block instead of using ?editable_html to store your up-dateable text, you'll instead use the ?localize tag to call text strings according to the users language and country from a tsv file that you've uploaded in the feature block configuration. Even better, multiple sml tabs can call from the same phrasebook manager block so you can update all the translations on all your tabs with a single upload by adding a new TSV file. Note that this does not work with text outputted from other feature blocks, only for stand alone plain text. If you're outputting text from feature blocks and want to localize it you'll need to use if logic to swap between multiple instances of the same block, one for each language/country set you're supporting. |
![]() |
Document generated by Confluence on Feb 12, 2013 09:09 |